home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Glitch Apple Disk Collection
/
2014.glitch.apple.collection.zip
/
indexed
/
EXODUSCS.DSK
/
PIC CRUNCHER 2.bas
< prev
next >
Wrap
BASIC Source File
|
2014-09-09
|
2KB
|
44 lines
1 REM <CTRL-J><CTRL-J><CTRL-J> PIC CRUNCHER 2<CTRL-J> --TAKEN FROM--<CTRL-J> CORE V1:I1:PG23<CTRL-J><CTRL-J>
2 REM <CTRL-J><CTRL-J><CTRL-J> TYPED IN & MODED BY<CTRL-J> THE BLUE BUCCANEER!<CTRL-J> OF THE REBEL ALLIANCE<CTRL-J><CTRL-J><CTRL-J>
3 REM <CTRL-J> -------------------<CTRL-J>
10 NORMAL : TEXT : HOME :D$ = CHR$(4)
40 IF PEEK(103) = 1 AND PEEK(104) = 96 THEN 60
50 POKE 103,1: POKE 104,96: POKE 24576,0: PRINT D$"RUN PIC CRUNCHER 2"
60 NORMAL : TEXT : HOME : POKE 230,32: POKE -16304,0: POKE -16300,0: POKE -16297,0: POKE -16301,0
70 IF PEEK(8 *256 +3) = 169 AND PEEK(8 *256 +4) = 255 THEN 110
80 VTAB 22: PRINT " {> Please wait while I load files <}"
90 PRINT D$"BLOAD PIC CRUNCHER 2.UNPACKER,A$300"
95 PRINT : PRINT D$;"BLOAD PIC CRUNCHER 2.PACKER"
110 LO = 8 *256 +15 *16 +12
120 HOME : POKE -16304,0: VTAB 22: PRINT "[P]ack or [U]npack Picture: ";: GET A$: PRINT
130 IF A$ < >"P" AND A$ < >"U" THEN PRINT " WRONG.......": GOTO 120
140 IF A$ = "U" THEN 360
150 REM <CTRL-J><CTRL-J>{PACK}<CTRL-J><CTRL-J>
160 VTAB 24: PRINT " Enter NAME of picture to COMPRESS:"
170 HTAB 5: INPUT "> ";NA$: IF NA$ = "" THEN PRINT CHR$(4)"CATALOG": GOTO 170
171 ONERR GOTO 170
180 IF LEFT$(NA$,1) = D$ THEN TEXT : HOME : PRINT NA$: GET A$: HOME : POKE -16304,0: GOTO 160
190 IF NA$ = "" THEN 220
200 PRINT D$"BLOAD"NA$",A$2000"
220 CALL 8 *256 +3
230 LE = PEEK(LO) + PEEK(LO +1) *256 -16384
240 PRINT "Length of picture after compression:";LE
250 PRINT "Number of bytes saved:"8192 -LE
260 PRINT "Percentage defference: ";100 - INT(LE/8192 *100)"%"
270 PRINT "BSAVE the compressed picture: (Y/N)?";: GET A$: PRINT
280 IF A$ < >"Y" THEN HOME : GOTO 120
290 PRINT "Save under what name ('.C' is appended)"
300 HTAB 5: INPUT "> ";NA$: IF NA$ = "" THEN PRINT CHR$(4)"CATALOG": GOTO 300
301 ONERR GOTO 300
310 IF LEFT$(NA$,1) = D$ THEN TEXT : HOME : PRINT NA$: GET A$: POKE -16304,0: HOME : VTAB 22: GOTO 290
320 IF NA$ = "" THEN HOME : GOTO 120
330 PRINT D$"BSAVE"NA$".C,A$4000,L"LE
340 GOTO 120
350 REM <CTRL-J><CTRL-J>{UNPACK}<CTRL-J><CTRL-J>
360 PRINT "Name of Cmprssed pic ('.C' is appended)"
370 HTAB 5: INPUT "> ";NA$
380 IF LEFT$(NA$,1) = D$ THEN TEXT : HOME : PRINT NA$: GET A$: POKE -16304,0: HOME : VTAB 22: GOTO 360
390 IF NA$ = "" THEN 410
400 PRINT D$"BLOAD"NA$".C,A$4000"
410 CALL 3 *256: REM {UNPACK}
420 GOTO 120